package com.polaris.live.im.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * TrackPushEntity
 *
 * @author Created by lucas on 2024/1/1 07:12
 */
@Entity(tableName = "track_push")
data class TrackPushEntity(
    /**
     * 事件id
     */
    @PrimaryKey
    @ColumnInfo(name = "event_id")
    val eventId: String,
    //----- 设备信息
    /**
     * 唯一标识
     */
    @ColumnInfo(name = "unique_id")
    val uniqueId: String? = null,
    /**
     * 用户id
     */
    @ColumnInfo(name = "user_id")
    val userId: Long? = null,
    /**
     * 应用版本
     */
    @ColumnInfo(name = "app_version")
    val appVersion: String,
    /**
     * 构建版本
     */
    @ColumnInfo(name = "build_version")
    val buildVersion: Int,
    //----- 事件属性
    /**
     * 入口页面（业务定义）
     */
    @ColumnInfo(name = "entrance_page")
    val entrancePage: String? = null,
    /**
     * 页面名称
     */
    @ColumnInfo(name = "page")
    val page: String,
    /**
     * 页面id
     */
    @ColumnInfo(name = "page_uuid")
    val pageUuid: String,
    /**
     * 子事件名称
     */
    @ColumnInfo(name = "event")
    val event: String? = null,
    /**
     * 子事件类型
     */
    @ColumnInfo(name = "event_type")
    val eventType: String? = null,
    /**
     * 拓展字段，json格式
     */
    @ColumnInfo(name = "ext")
    val ext: String? = null,
    /**
     * 事件时间戳
     */
    @ColumnInfo(name = "event_timestamp")
    val eventTimestamp: Long
)